package com.starryx.blog.dao;


import com.starryx.blog.po.Tag;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


import java.util.List;

/**
 * Created by limi on 2017/10/16.
 */

@Repository
public interface TagMapper {
    Tag findOneById(@Param("id") Long id);

    List<Tag> findAllByBlogId(@Param("blog_id") Long id);

    Tag findOneByName(@Param("name") String name);

    List<Tag> findAll();

    List<Tag> findAllByIds(List<Long> ids);

    Integer count();

    int save(Tag tag);

    int update(Tag tag);

    void delete(@Param("id") Long id);

    void deleteBlogRelation(@Param("id") Long id);
}
